package com.ocom.human.utils;

import com.ocom.common.entity.human.EntityPersonnelInfo;
import com.ocom.human.service.PersonnelFaceFeatureService;
import org.slf4j.Logger;

public class FeatureRunnableTask implements Runnable {


    EntityPersonnelInfo entityPersonnelInfo;

    private PersonnelFaceFeatureService personnelFaceFeatureService;

    public Logger logger ;

    public FeatureRunnableTask(EntityPersonnelInfo entityPersonnelInfo, PersonnelFaceFeatureService personnelFaceFeatureService,  Logger logger) {
        this.entityPersonnelInfo = entityPersonnelInfo;
        this.personnelFaceFeatureService = personnelFaceFeatureService;
        this.logger = logger;
    }

    @Override
    public void run() {

        try {
            personnelFaceFeatureService.addEntityPersonnelFaceFeature(entityPersonnelInfo.getComId(),entityPersonnelInfo,logger);
        } catch (Exception exception) {
            logger.info("人脸特征值 FeatureRunnableTask 异常 :【{}】", "定时任务订单查询", exception);
        }

    }
}
